package g16.keephealthy;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;


public class MainActivity extends Activity {

	Button Button01,Button02,Button03,Button04,Button05;
	
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        Button01 = (Button) findViewById(R.id.Button01);
        Button02 = (Button) findViewById(R.id.Button02);
        Button03 = (Button) findViewById(R.id.Button03);
        Button04 = (Button) findViewById(R.id.Button04);
        Button05 = (Button) findViewById(R.id.Button05);
        
        Button01.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent TrocaEcran = new 
				Intent(MainActivity.this,CalculaActivity.class);
				MainActivity.this.startActivity(TrocaEcran);
				MainActivity.this.finish();

			}
		});
        
        
        Button02.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent TrocaEcran = new 
				Intent(MainActivity.this,ExerciciosActivity.class);
				MainActivity.this.startActivity(TrocaEcran);
				MainActivity.this.finish();

			}
		});
        
        
        Button03.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent TrocaEcran = new 
				Intent(MainActivity.this,EstatisticasActivity.class);
				MainActivity.this.startActivity(TrocaEcran);
				MainActivity.this.finish();

			}
		});
        
        
        Button04.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent TrocaEcran = new 
				Intent(MainActivity.this,DadosActivity.class);
				MainActivity.this.startActivity(TrocaEcran);
				MainActivity.this.finish();

			}
		});
        
        Button05.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent TrocaEcran = new 
				Intent(MainActivity.this,InfoActivity.class);
				MainActivity.this.startActivity(TrocaEcran);
				MainActivity.this.finish();

			}
		});
      
      
   
        
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}
